import web

page_classes = {}
urls = []

import pages
for name in dir(pages):
  value = getattr(pages, name)
  if isinstance(value, type) and issubclass(value, pages.Page) and value.url:
    page_classes[name] = value
    urls += [value.url, name]

app = web.application(urls, page_classes)


